package com.dyb.demo.strategy;

/**
 * 实现Root
 * @author dyb
 * @date 2021/1/26
 */
public class Root extends AbstractStrategyRouter<String, String> {


    @Override
    protected StrategyMapper<String, String> registerStrategyMapper() {
        return p -> {
                if ("A".equals(p)) {
                    return new A();
                } else if ("B".equals(p)) {
                    return new B();
                }
                return null;
            };
    }

}
